package com.syt.test.entity

class Addres {

    var name: String = "Holmes, Sherlock"
    var street: String = "Baker"
    var city: String = "London"
    var state: String? = null
    var zip: String = "123456"

    fun copyAddress(addres: Addres): Addres {
        val result = Addres()
        result.name = addres.name
        result.street = addres.street
        result.city = addres.city
        result.state = addres.state
        result.zip = addres.zip

        return result
    }

    var counter = 0
        set(value) {
            if (value >= 0) field = value
        }
}

fun main() {
    val hello = Addres()
    hello.counter = -10
    println(hello.counter)
}